//
//  CollectListCell.m
//  QQplayground
//
//  Created by 王昭的Mac Air on 2018/6/10.
//  Copyright © 2018年 zhang. All rights reserved.
//

#import "CollectListCell.h"

#define COLLECT_NUM_COLOR 0x888888

@implementation CollectListCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self = [[NSBundle mainBundle] loadNibNamed:@"CollectListCell" owner:nil options:nil].lastObject;
    }
    return self;
}

-(void)dataToView:(NSDictionary *)item{
    [_labTitle setText:convertToString(item[@"title"])];
    _imgIcon.image = [UIImage imageNamed:item[@"icon"]];
    _labNum.text = @"23";
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
//    _imgIcon.contentMode = UIViewContentModeScaleAspectFit;
    [_labTitle attributeFont:FontFiftent textColor:UIColorFromRGB(TextSizeOneColor)];
    [_labNum attributeFont:FontThirteen textColor:UIColorFromRGB(COLLECT_NUM_COLOR) alignment:NSTextAlignmentRight];
    _labLine.backgroundColor = LINE_COLOR;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
